.sidebar {
	--transitions-duration: 200ms;

	position: fixed;
	z-index: 100000;
	top: 0;
	bottom: 0;

	display: flex;
	flex-direction: column;

	width: 68px;
	height: 100%;

	user-select: none;

	color: var(--color, #ffffff);
	background: var(--background, @primary-background-color);
	align-items: stretch;
	-webkit-app-region: drag;

	&.sidebar--hidden {
		display: none;

		& ~ .add-server-view,
		& ~ webview {
			left: 0;
		}
	}

	&.sidebar--macos {
		.sidebar__inner {
			padding-top: 28px;
		}
	}

	.sidebar__inner {
		display: flex;
		flex-direction: column;
		flex: 1 1 0;

		padding-top: 10px;

		background-color: rgba(0, 0, 0, 0.1);
		align-items: stretch;
	}

	.sidebar__list {
		display: flex;
		flex-direction: column;
		flex: 0 0 auto;

		margin: 0;
		padding: 0;
		align-items: stretch;
		-webkit-app-region: no-drag;
	}

	.sidebar__action,
	.sidebar__list-item {
		position: relative;

		flex: 0 0 auto;

		box-sizing: border-box;
		margin: 4px 0;

		font-size: 2.5rem;
		line-height: 1.25;

		&[data-tooltip]::after {
			position: absolute;
			top: 50%;
			left: 100%;

			display: block;
			visibility: hidden;

			padding: 0.5rem 1rem;

			content: attr(data-tooltip);

			transition: all var(--transitions-duration) ease-out var(--transitions-duration);
			transform: translate(10px, -50%);

			white-space: nowrap;
			pointer-events: none;

			opacity: 0;

			color: #ffffff;
			border-radius: 2px;
			background-color: #1f2329;

			font-size: 0.875rem;
			line-height: normal;
		}

		&[data-tooltip]:hover::after {
			visibility: visible;

			transform: translate(0, -50%);

			opacity: 1;
		}
	}

	.sidebar__action {
		display: flex;
		flex-direction: row;

		height: 40px;
		padding: 0;

		cursor: pointer;

		color: inherit;

		border: none;
		background: none;

		align-items: center;
		justify-content: center;

		.sidebar__action-label {
			width: 40px;
			height: 40px;

			transition: opacity var(--transitions-duration);

			opacity: 0.6;
			color: inherit;
			background-color: rgba(0, 0, 0, 0.1);
		}

		&:hover .sidebar__action-label {
			opacity: 1;
		}
	}

	.sidebar__add-server .sidebar__action-label {
		line-height: 30px;
	}
}

.sidebar__server-list {
	&.sidebar__server-list--shortcuts .server .server__shortcut {
		visibility: visible;
	}

	.server {
		position: relative;

		display: flex;

		cursor: pointer;

		color: inherit;

		font-size: 24px;
		align-items: center;
		flex-flow: row wrap;
		justify-content: space-between;

		&::before {
			flex: 0 0 auto;

			width: 5px;
			height: 0;
			margin-right: -5px;

			content: "";
			transition:
				height var(--transitions-duration),
				opacity var(--transitions-duration);

			opacity: 1;
			border-radius: 0 3px 3px 0;
			background-color: #ffffff;
		}

		.server__initials {
			flex: 1 1 auto;

			transition: opacity var(--transitions-duration);
			text-align: center;

			opacity: 0.6;

			line-height: 42px;
		}

		.server__favicon {
			display: none;
			flex: 1 1 auto;

			width: 42px;
			height: 42px;

			transition: opacity var(--transitions-duration);

			opacity: 0.6;
			object-fit: contain;
		}

		.server__badge {
			position: absolute;
			z-index: 1;
			top: 2px;
			right: 8px;

			display: block;

			min-width: 15px;

			text-align: center;

			color: #ffffff;

			border-radius: 20px;
			background-color: #e43325;
			box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);

			font-size: 10px;
			font-weight: bold;
			line-height: 15px;
		}

		.server__shortcut {
			visibility: hidden;
			flex: 1 0 100%;

			padding-top: 8px;

			text-align: center;

			font-size: 12px;
			line-height: 1;
		}

		&.server--unread {
			&::before {
				height: 6px;

				opacity: 0.6;
			}
		}

		&.server--active,
		&:hover.server--active {
			&::before {
				height: 30px;

				opacity: 1;
			}

			.server__favicon,
			.server__initials {
				opacity: 1;
			}
		}

		&.server--with-favicon {
			.server__initials {
				display: none;
			}

			.server__favicon {
				display: initial;
			}
		}

		&.server--dragged {
			opacity: 0.5;
		}

		&:hover .server__initials,
		&:hover .server__favicon {
			opacity: 0.8;
		}
	}
}
